error handling...

only go to the next page if there is not an error