fix splitLine function. it now splits the string even if it has no spaces before length limit but has spaces after it to make printed lines shorther.
improve error reporting when config file has invalid format (resolves #909)