Fixed meta logic for creating a file