fixing bugin case of extensionless filenames