Fix incorrect dependencies used when adding a persisted task.
Don't update messages in the background for testing files.