Adding error handling to purge all.