Make config file optional
Fix tmpfile vs. logfile mixup