Refactored method for saving to config file. Updated it so that it no longer always adds a blank line, result in files with excessive blank  lines