add log4j xml, track number of running instances