some try-catch improvements