handle documents without option sections
remove debug
1.0.1