First simple logger
Some fixes and improvements