Improve handling of tasks files