Added write method to log writer.