Added loging to mysql