cleaned up and added step where a configuration file is written