Support header-only requests
add image existence check