enable logging and option 'wait'