I think $filename should hold the file for consistency with most of the other events involving files.