First version. stdout.txt functionality missing.