first pass at error logging