Fix the file open reopen mistakes and playing no end bug for strean file