Added basic logging. (Won't work until main() is finished.)