added additional try-catches;