creating proper log flow