added gallerydump support (kind of)