Added utility function for reading text from a file