added timeout on read channel