Fix comparison in log
Fix segfault on empty lines