Redirecting the output

For example,
if we run the below command,

symcfg list -thin -pool

, results in an output most of the times and if the out is generated i'm able to redirect the output to a file. but sometimes it doesnt result any output and even though the output is being redirected, i can see "No Thin Pools " on the screen.
script below is what i used

sudo symcfg list | grep -E 'Local|Remote' | awk '{print $1}' | while read line; do line="${line##*()}";

sudo symcfg -sid "$line" list -thin -pool -GB > /tmp/pooltmp/file_"$line".dat

exists=$(grep -c 'No|error' /tmp/pooltmp/file_"$line".dat)
if [[ $exists -gt 0 ]]
 then
 #echo "No Device Pools"
 echo ""$line"" >> /tmp/pooltmp/nodevicepools.dat
 else
 #echo "Device Pools are configured"
 echo ""$line"" >> /tmp/pooltmp/devicepools.dat
 fi

 done >> /tmp/pooltmp/output

 cat /tmp/pooltmp/devicepools.dat | while read line ; do line="${line##*()}";
 output=`awk 'END{print NR}' /tmp/pooltmp/file_"$line".dat`
 if [[ "$output" -le 2 ]]
 then
 echo ""$line"" >> /tmp/pooltmp/nopoolarrays.dat
 else
 echo ""$line"" >> /tmp/pooltmp/symmetrixid.dat
 fi
 done

 if [[ -f /tmp/pooltmp/symmetrixid.dat ]]
 then
 echo "Refer /tmp/pooltmp/symmetrixid.dat for the Local and Remote VMAX arrays with thin pools"
 else
        echo "No output file generated"
 fi

 if [[ -f /tmp/pooltmp/nopoolarrays.dat ]]
 then
 echo "Refer /tmp/pooltmp/nopoolarrays.dat for the Local and Remote VMAX arrays with no thin pools"
 else
        echo "No Output file generated"
 fi

Does the message say "no thin pools" or does it say the full string you're echoing. In other words, could that message be from the symcfg command and it is writing to standard error.

symcfg -sid 403 list -thin -pool -gb 
    >>>>>>>>>. this kind of output goes to a file
Symmetrix ID: 000008657403

                       S Y M M E T R I X   P O O L S                       
---------------------------------------------------------------------------
Pool         Flags  Dev              Usable       Free       Used Full Comp
Name         PTECSL Config              GBs        GBs        GBs  (%)  (%)
------------ ------ ------------ ---------- ---------- ---------- ---- ----
EFD12          TEFDEI RAID-5(3+1)      4399.1     1231.7     3167.4   72    0
FC---45        TFFDEI RAID-5(3+1)     33666.8    14650.7    19016.2   56    0
SATA---66      TSFDEI RAID-6(6+2)     51702.5    29381.0    22321.6   43    0

Total                            ---------- ---------- ---------- ---- ----
GBs                                 89768.4    45263.4    44505.2   49    0

Legend:
  (P)ool Type:
    S = Snap,  R = Rdfa DSE  T = Thin
  (T)echnology:
    S = SATA, F = Fibre Channel, E = Enterprise Flash Drive, M = Mixed, - = N/A
  Dev (E)mulation:
    F = FBA, A = AS400, 8 = CKD3380, 9 = CKD3390, - = N/A
  (C)ompression:
    E = Enabled, D = Disabled, N = Enabling, S = Disabling, - = N/A
  (S)tate:
    E = Enabled, D = Disabled, B = Balancing
  Disk (L)ocation:
    I = Internal, X = External, M = Mixed, - = N/A
symcfg -sid 675 list -thin -pool -gb
>>> for this it creates a file with the output but has only Symmetrix ID: 000192600675 in it. the rest is displayed on the screen
Symmetrix ID: 000192600675

The gatekeeper device (while using the Base Daemon) has an error (Please see the Log file) 

or

symcfg -sid 459 list -thin -pool -gb

>>> for this it creates a file with the output but has only Symmetrix ID: 000192600675 in it. the rest is displayed on the screen

Symmetrix ID: 000192600459

No Device Pools found