Fixed closing file descriptor 0~2