Only count files that have lines.
Make logging a bit more useful.