add binary file handling