Log link stats to file