Making the reading of file contents more robust.