Add unistd header to be able to use close and sleep :)