Fixes some pathing issues and invalid file