modified if clause for overwriting drag_data output file