adding fixes to logging and CF code