Fix EOF handling, add event log tests