created logfile for logic
added method to set state

-added constants for setting state
-edited code for creating logfile