CLosing file stream if we pass the ending of the file.