make logging realtime and smooth