fix EOF when meet binlog file with only header
fix logger and tests