added 2>&1 to end of rsync command line (after the >> $tempfile) to try to catch error messages