Closing file descriptor when exit() is called
got rid of offset in fdesc as it was obsolete