[FileMap] Fixed issue with empty data file after rewriting.