public static function parseFile($filepath)
    {
        if (!is_file($filepath)) {
            throw new \RuntimeException('File not found: ' . $filepath);
        }

        if (!$filedata = static::readFiledata($filepath)) {
            throw new \RuntimeException('Error reading file: ' . $filepath);
        }

        if (!$json = self::decode($filedata)) {
            throw new \RuntimeException('Error parsing json: ' . $filepath);
        }

        return $json;
    }