some bugfixes, script now shows which file had been processed