set write to binary mode