*8151* Added session_write_close as a shutdown function