1. When more than 2 streams are piped, we use threads to read/write data parallely. In this scenariod read_atmost_n API was being used instead of read_all. 2. Another issue with check_output argument validation fixed.