add support for output to file based on XML config