deug readbuffer for screenshot