Removed the extra notepad.exe at the end that was combined with 'fi', caused second if statement to fail.