write_byte() debug function working