Fix logging format

Fixes #361
Fix race condition, don’t rely on detect feature

detect feature is to be tested though
Readd log_ prefix and expand log_file
Merge remote-tracking branch 'zyx-i/fix-361' into develop