check for errors in setenv