Refactor message reading/writing and error handling
update rust_bindgen.sh