Properly closing directory stream / removed comments.