Fix opening file safely for save files.