added global config class; fixed work with resources to stream type;