Added logging

LOG_FRAMES in gameengine is the number of frames between each time the
state is written to the log