set timeout to None in write_bytes()