better error logging messages