fixed the loging