improve comments, added environment test
check for test env before require plugins