better long filename detection method