running io operations in a lock
Handling SIGINT