used ExceptionDispatchInfo for ioexception handling