Moved filename out of beforesave and into validation