fixed autoflush bug. added a unit Log.java