add except condition and binary file support