Check if file exists before writing to excel