Program now runs with only formatting issues when outputing to log files. No other bugs known. Documentation still needed