keep a log of last error