First working draft of photodump script