in src/main/scala/com/gu/contentapi/services/Loader.scala [10:17]
def linesFromFile(path: Path): Try[Seq[String]] = {
implicit val codec: Codec = Codec.charset2codec(Charset.forName("ISO-8859-1"))
val s = Try { Source.fromFile(path.toFile) }
val content = s.flatMap(src => Try { src.getLines().toSeq })
s.map(_.close())
Files.deleteIfExists(path)
content
}