added exception when no config is passed and some tests