Added createFile function