Add write functionality to task db