how to prevent data corruption