Handler for Log.write