Added licence and updated config file generation to actually write to a file not...