Limit catches to pexpect.EOF, print previous output