Added graphgenerator, fixed termpredictor and added error logging in lieu of crashing+exiting.