Remove unused import.
Fix minor code style problems.
Fix dealing with failure to create config file.