fix logging
implemented async write for insert stmt