Add basic file format autodetection.