File logging patched