Changed bat to output to a log file