fix config written to wrong location