Timeout when waiting for frame, line buff for stdout/stderr, misc fixes