Added a loggingEnabled property for debugging