Added check to verify if file exist before deleting it.