I think it would be good to clarify what the file stands for here. Is it a path? Is it a handle? Is it a File object?