} catch (final IOException e) {
<BUG>log.error("Error in writing to the channel.", e);
</BUG>
WriterUtil.close(writableChannel, log);
<BUG>}
}</BUG>
public static void close(final Closeable closeable, final Log log) {
try {
closeable.close();
} catch (final IOException e) {

} catch (final IOException e) {
log.error("Caught exception while writing to the channel.", e);
WriterUtil.close(writableChannel, log);
}
return bytesWritten;
}
public static void close(final Closeable closeable, final Log log) {
try {
closeable.close();
} catch (final IOException e) {
