handle empty config file better, fixes #172
handle broken config file, fixes #211