catch os.kill exceptions