[FIX] Correct _save_file method to support unicode