Fix empty file creation issue.