fix tread safety on script/config paths