error handling on checks