Try and catch to prevent error failure