added flush method to Log.java