Fixed issue with file not being saved in the correct location