improved config directory check
return codes now and enum
fixup! 8c83ef20
fixup! 790b0afe