If exception happens in the `callback.doWithInputStream(inputStream)`, we don't close the `inputStream = session.readRaw(remotePath)`. * Move the `InputStream.close()` to the `finally` block of the `SessionCallback` action in the `RemoteFileTemplate.get()` **Cherry-pick to 5.0.x and 4.3.x**