Adds logging for EOF