error checking for timeout values