All logging moved to function cLOGGER. Needs to be tested.