moved config around and put logging next to executing script