refactor of Print Snapshot plugin