Improved file creation

No need to create and rename.