finished logic models file io and error logging