core: remove trailing spaces before writting logline to file