set timeout to 20s in write_bytes()