removed write-callback now that simply passing a filehandle