Added  handle exceptions in app