Close dask objects to avoid memory issues
When the main function is used by another tool with for example a for loop we need to close the objects to avoid memory issues.
When S1processors is used trough the current cli, the objects are close with the end of the python interpreter.