modified to delete output file when command failed.
modified to close other commands when command failed.
added gz option to Outputtxt.
added to mv command to move output file.
update logdb version.