Logs: Fix displayed filename when empty (ticket #1386)
 - More synchronization
SAM: Fix v3 LS publish, broken in -4 (ticket #1390)
 - code cleanup in direction handling