Add document and dump database file