fix shred error handling