Fix FileMap writing method (add missing flags)