add cleanFolder method for patch queries