A fix for the `add_file` method