Replace console.log with injected $log provided by Angular
Fix dependency injection of window service