Moved the log outputs to the tmp directory.

Also fixed a small warning issue.