script for downloading image