I get an error that dataInput is not bound. I don't know why. It seems like a valid let expression. Please explain. Thanks very much!
(define imageList "/home/perry/dir_image_search_list") ;text file of image exif data in a proper list
(if (file-exists? imageList)
(let ((dataInput (open-input-file imageList))
(raw-data (read dataInput))) ;dataInput is not bound for some reason
(if (eof-object? raw-data)
(begin
(display "file is empty")
(close-port dataInput)
'()
)
(begin
(car raw-data) ;placeholder for future code to process the list
(close-port dataInput)
))
)
(begin
(display "file not found")
'()
)
)