You aren't even attempting to check for the blank line in your code, so what do you expect?

I'd say one easy way to check for that condition is checking the value returned by sscanf(). It returns the number of fields it successfully parsed which will be 2 for the lines actually containing a timestamp. The return value will be something else for the blank line.