Should log at WARN level instead when failed to close a file.