Change safe_file to a more generic name safeio