Fix logfile destination

Log file was always written to the same file regardless of the config.
Better errors when script not found

More descriptive error when the mining scripts are incorrectly
configured.