automatic loading added
removed most of the log code