Move getFileContents to after where it is first used.