Fixed errors in logging