read the contents from file