onentry reading and writing log entry