Add filetype detection
All functions start with cf_