more robust handling of missing output lines