fix issue where total filesize of 0 in callback resulted in ZeroDivisionError