- Added lock around serial reading / writing for threadsafety