Improved error handling when translation file cannot be generated on disk