Updated Error Catching