all try catch inserted to catch error