How are you setting path.config and what is its value?
It could be your configuration file has a byte-order-mark as the first byte.
If you are pointing path.config at a directory then logstash will concatenate every file in the directory. If the first file (alphabetically) is not a configuration file it could cause this error.