You should bind an output port to a variable
Something like
(define storeme
(lambda (lst)
(let* ((filename (prompt-for-filename)) ;;the prompt routine should retrun #f
(output ;for invalid filenames or user cancellations
(open-file-output-port ;;routine may vary be implementation and scheme revision
(string-append *default-path* filename))))
(begin (if filename
(begin (write lst output) (display-each "List Stored in " filename))
(display "List not stored"))
(close-output-port output)))))