Fixing file null bytes problem, will test it later