basic error checking, nothing special