Add main getFileContents() function and 2 methods implementing it.