Simplified add_file function