add file type discovery and resolution to ec_file