added saving of flow images