Fix division by zero when there are no files to scan