Raise exception if the plugin didn't work and didn't generate the expected file
Check if the session is already in the list before adding it