clean up implementation of atomic_configure_file