now handles input filenames without extensions