MAJOR Implemented basic logging routine.