 set time     [ timestamp -format "%Y/%m/%d %H:%M:%S"]
 send_log "\n---------- log close at $time ----------\n"
 log_file
-exec /bin/bzip2 /home/case/store/work/_archives_worklogs/$host-$filetime.log
+exec /bin/bzip2 $logdir/$host-$filetime.log
 send_user "\n---------- session closed at $time ----------\n"
 exit
 

      if { $app == "nsm" } { 
        expect timeout {
          set timeout 60
        } "*$ " { 
          send "exit\r" 
          sleep 1

}

expect "*# " {
  log_file "$logdir/$host-$filetime.log"
  send_log "\n---------- log start at $time ----------\n"
  send_user "\n---------- session start at $time ----------\n"

