clear up misunderstandings around get_stat and ENOENT; genericize parsing for site info
cppcheck found memory leak, free str in log.c
small fixes to logging