 Correct the input values for amount and offset such that their sum is less than or equal to 4 Gigabytes. If error occurs in a read or write loop, check the looping conditions and/or offset increments.