Adding close() for UNIX