Return 1 if there was an error.