Fixes for file saving process.