Update main.js

Addresses issue #82. loadConfig function now checks if content is defined before attempting to parse settings file.