migrated new code to the new logging