Some error handling added in AsynWriter