Added Errors

Now writes an error message if it cannot open or save to the config file.