adding some thread waits in the inputstream so we can catch the open file descriptors.