record the error information
modify the process due to error ( inputstream is closed and error
happend when program want to close the inputstream)