Add db name and output directory options.
Add db name to the filename.
Don't lock database.