writedb can write to different paths and is now used w/ export()