add --verify flag and relevant support