refactored saveTask and implemented some docker tests for it