Added Try-Catch handler.