Handle file types using Textpattern's callback events.