raise exception if no images found
fix json bug