fixed corrupted file issue when saving on server - 3