fixed usefilename to use filename instead of clean name