refine dump and add screenshot rest api