add get_dict method
add binary flag for opening files in windows