This will result in diff>timeout if timestamp==0, therefore (!running and !done), which will result in displaying "Cancelled" on the status page.

It might work as a temporary fix, but the host should try repeated reads several times before giving up on this. Or have an additional check for timestamp ("if timestamp:"), which may add an additional flag to indicate that reading the running file failed.