be sure to actually catch signals for closing and act on them