added small try catch in a common error area