some fixes for kraken tool

Just some changes to get it working with compressed or uncompressed files. And some new formating code.