added a catch/try wrapper to file save