Update the file logging method.