synchronized the write method
clean reseources when the appender is closed
create connect method to allow reconnect when failed or error
synchronized update method