added try catch to controller entry point