added loging system