Modufy try catch block