improvements to fileprompt()