fixed generation of xml file names, added test for hook