def METHOD_NAME(self, file_path: str, error_msg: str) -> None:
    """
    Writes error message to the file.
    """
    try:
        with open(file_path, "w") as fp:
            fp.write(error_msg)
    except Exception as e:
        warnings.warn(f"Unable to write error to file. {type(e).__name__}: {e}")