trying to fix SIGINT error, tried locking the mutex before destroying
hkdown not writing properly, tried changing arguments in write