fix some errors and tune loglevel
fixes around context file processing code