Adding some basic error checking