Tried to use enviromental variables to determine if XML output is appropriate