Fixed Buffer-size mismatches, synclink_init, and implemented record function for logging (rather than printf)