logger performance fix, final logger class; fix phpunit tests; fixed reopen logger stream