added try and catch to file Chooser