fix folder reference, add flags