Re-order the operations around i/o to cope with stop files Closes #768 and #624 See merge request !1580