Here is what I get for your code.....
Mounting USB device...
read done Open /usb/numbers.txt
Writing numbers (0/10)
Writing numbers (1/10)
Writing numbers (2/10)
Writing numbers (3/10)
Writing numbers (4/10)
Writing numbers (5/10)
Writing numbers (6/10)
Writing numbers (7/10)
Writing numbers (8/10)
Writing numbers (9/10)
File closing
File closed
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning1
msd.connected() is returning0
msd.connected() is returning0
msd.connected() is returning0
msd.connected() is returning0
msd.connected() is returning0
msd.connected() is returning0
msd.connected() is returning0
msd.connected() is returning0
msd.connected() is returning0
msd.connected() is returning0
msd.connected() is returning0
msd.connected() is returning0