REwork some loging