File confusion fixes