You need to think how to handle sessionCommand.close() failures.