Added exitSignal, exitStatus arguments to the stopTask function.
Layer stats are now updated when a task completes.