final C code logging patchups