fix gettting contents from file