added traps for files without extensions