improve loggin