added define ENABLE_LOGGING