Added an option for saving text documents with BOM or not