bugfix for UNK computation
tweaked debug information
safer tmpdir