Added elaborate sample program for logging, and prepared file extraction