update app directory and add flatten option