last line of defense error checking