Move the db not found stuff to a separate file