Added check for writeable config directory