Encapsulate read and implement timeout #20