Fix trigger logic. Now use only GenericTriggerEventFlag
Fix folder logic.