@adamcrews
Refactor to allow logfile to work properly
40c589a