Writing routines to read files into memory and execute programs