removed warnings, made slow device reads more reliable to EINTR