move outside return from try-catch