begin binary file implementation