結果 : check if file exists before writing python