made addToPow a little smarter

added detection of input variable.
added detection of existing log file.
fixed my shebang