improved atomic creation of setup files