added check for environment variables
set check for XOUT