Added log to middleware
Added finish log to run