Remove quotes on variable declarations. Small fixes in logfile output.
Remove output to stdout, this is an noninteractive script
Remove duplicate echos.
Remove backup copies
Fixed branching.