Logger code 1st version