Added check for output file exists