improve error handling in sequencefile.go and elsewhere
add another test for sequencefile