i really need to check over what i write...

changed fprintf to printf, this caused a segfault under FreeBSD.