added try catch to new file and formatter