made a mistake calling path.splitext correcting