Be careful to not use the flash file system while using mass storage because both pieces of code attempting to change the fs can corrupt it.