Streamlined error checking