and errors in logging fixed