fix create file path method
catch exceptions