fixed bug with .opened file