Smarter file creation