fixed errors in logging