Added closing of file descriptor.
Code cleanup.
Code cleanup.