Need to Write files to pen drive using usb host shield

sir im using usb host shield controller with ardunio mega . I have used UHS30 and USBFat library but both of them gave errors. USB_Host_Shield_2.0 library is detctecting my pen drive but dont know how to write to device please help me with some examples