Made trace logging a runtime flag