Lazarus file I/O interface

My first go at basic file I/O with Lazarus GUI Interface. I did this many times using Free Pascal. Successfully wrote a skeleton or stub program to get Input/Output file names with the Lazarus GUI. Check if output file exists so no accidental overwrites. Then read/write files. This is the basis of something I do all the time.

Note: I first tried the standard Free Pascal Assign and Close, which compiles
and runs in Free Pascal fine. However in Lazarus the Assign was giving
me a wrong number of arguments error. To make a long story short they
have been replaced in Lazarus by assignFile and closeFile.

I read about this here!

I was also told I could use ‘system.assign’ and ‘system.close’. By specifically mentioning the system-unit the compiler doesn’t look in it’s current class for those functions, but in the system-unit.