<commit_before>package main

import (
	"flag"
	"fmt"
	"log"
	"os"
	"go9p.googlecode.com/hg/p"
	"go9p.googlecode.com/hg/p/clnt"
)

var debuglevel = flag.Int("d", 0, "debuglevel")
var addr = flag.String("addr", "127.0.0.1:5640", "network address")

func main() {
	var n int
	var user p.User
	var err *p.Error
	var oerr os.Error
	var c *clnt.Clnt
	var file *clnt.File

	flag.Parse()
	user = p.OsUsers.Uid2User(os.Geteuid())
	clnt.DefaultDebuglevel = *debuglevel
	c, err = clnt.Mount("tcp", *addr, "", user)
	if err != nil {
		goto error
	}

	if flag.NArg() != 1 {
		log.Println("invalid arguments")
		return
	}

	file, oerr = c.FOpen(flag.Arg(0), p.OREAD)
	if oerr != nil {
		goto oerror
	}

	buf := make([]byte, 8192)
	for {
		n, oerr = file.Read(buf)
		if oerr != nil {
			goto oerror
		}

		if n == 0 {
			break
		}

		os.Stdout.Write(buf[0:n])
	}

	file.Close()
	return

error:
	log.Println(fmt.Sprintf("Error: %s %d", err.Error, err.Errornum))
	return

oerror:
	log.Println("Error", oerr)
}
<commit_msg>Fix for issue 15<commit_after>package main

import (
	"flag"
	"fmt"
	"log"
	"os"
	"go9p.googlecode.com/hg/p"
	"go9p.googlecode.com/hg/p/clnt"
)

var debuglevel = flag.Int("d", 0, "debuglevel")
var addr = flag.String("addr", "127.0.0.1:5640", "network address")

func main() {
	var n int
	var user p.User
	var err *p.Error
	var oerr os.Error
	var c *clnt.Clnt
	var file *clnt.File

	flag.Parse()
	user = p.OsUsers.Uid2User(os.Geteuid())
	clnt.DefaultDebuglevel = *debuglevel
	c, err = clnt.Mount("tcp", *addr, "", user)
	if err != nil {
		goto error
	}

	if flag.NArg() != 1 {
		log.Println("invalid arguments")
		return
	}

	file, oerr = c.FOpen(flag.Arg(0), p.OREAD)
	if oerr != nil {
		goto oerror
	}

	buf := make([]byte, 8192)
	for {
		n, oerr = file.Read(buf)
		if n == 0 {
			break
		}

		os.Stdout.Write(buf[0:n])
	}

	file.Close()

	if oerr != nil && oerr!=os.EOF {
		goto oerror
	}

	return

error:
	log.Println(fmt.Sprintf("Error: %s %d", err.Error, err.Errornum))
	return

oerror:
	log.Println("Error", oerr)
}

{'fraction_non_alphanumeric': 0.1761223482979773, 'fraction_numerical': 0.022693635915145536, 'mean_word_length': 3.233820459290188, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7522208', 'n_tokens_mistral': 965, 'n_tokens_neox': 898, 'n_words': 202}