catching all exceptions to prevent application crash