adds in some error handling messaging