don't emit folder change events, refactor autoMerge function