Transaction-aware file creation