Added file close and get_unread funnction