sync with develop, cleanup for testing main, added test for log-to-stdout

One test is failing, test_force, will look at it later.