Logging update
Adding in missing var declaration

How dare I did this...