fix some more things including file bug