MAESTRO-3088 Ensure last chars of logging are sent before returning