Support single-file format for 3.1

#7