Diffusion KIO 83e04bc362a6

Use a lambda to reduce repeating code and better handle io errors

Authored by meven on May 30 2020, 7:37 AM.