@param fp File handle for the data file being written. @return 0 on success, <0 on filaure.
See Implementation
@param fp File handle for the data file being written. @return 0 on success, <0 on filaure.