Add flatoutdir settings and fix logic for stringent