now using PH_BINARY and PH_TEXT for io types. got rid of isBinary function and binary_format bool