Added logging to watch an error.