Use scala.util.Try instead of throwing exceptions everywhere