#13 improve read from device, now get count bytes available before read