Add download interface and purgShm to the writer