changes in displayFile function