Improved smoketest script, made logging optional.