improved file format, and fix #1414