Added a logger mechanism