Close the file handle on HEAD request