log with wait loop