fix maxfile option input
fix lost id with multi docs