Cleanup file size code in scanner