added logic to deal with photos added by old s3fs setup