<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_file_handler_to_root(log_fn):
 """Adds a file handler to the root logging. :param log_fn: the name of the log file. :type log_fn: str """

    file_handler = logging.FileHandler(log_fn, mode="w")
    file_handler.setFormatter(logging.Formatter(
        fmt="[%(asctime)s %(name)s %(levelname)s] %(message)s",
        datefmt="%Y-%m-%d %H:%M:%S",
    ))
    logging.root.addHandler(file_handler)