Read first, then wait for process end