Tried debugging original suggestion by prompting it with errors, but less effective. Code w/ ChatGPT feels counterintuitive. It's not running it's own code so will happily give you a non-working answer, despite "checking if a programme runs" being the easier bit of automation.