fixed: unblocked SIGINT and also checks return value of syscalls