added logging + fix of select in xml (WTF???!!)