Use the “Safely Remove Hardware” option in the OS to prevent data corruption.