removing some test prints and fixing a splitext issue