reads file inputted by the user in the terminal