add error handling if user fails to select a file