Reduce try catch complexity