added command line functionality and makes the files out.txt log.txt if they dont exist, otherwise cleans them