Consolidate file creation functions
Remove and replace with condensed function