module.exports = function (grunt) {
    'use strict';

    grunt.registerTask('livestyle', 'Description', function () {
        this.async();

        var config = grunt.config(this.name) || {},
            options = {
                root: config.root || 'app',
                port: config.port || 9000,
                proxy: config.proxy || null,
                jsx: config.jsx === false ? false : true,
                less: config.less === false ? false : true,
                scss: config.scss === false ? false : true,
                html: config.watchHtml === false ? false : true,
                cssImages: config.watchCssImages === false ? false : true,
                processimage: config.processimage === false ? false : true,
                debug: !!config.debug,
                mappings: config.mappings || {},
                browsers: config.browsers || [
                    '> 1%',
                    'last 2 versions',
                    'Firefox ESR',
                    'Opera 12.1'
                ]
            };

        var server = require('livestyle/lib/createLiveStyleApp')({
            watchHtml: options.html,
            watchCssImages: options.cssImages,
            dead: options.dead,
            debug: options.debug,
            root: options.root,
            compiless: options.less,
            compilesass: options.scss,
            autoprefixer: options.browsers,
            jsxtransform: options.jsx,
            processImage: options.processimage,
            mappings: options.mappings,
            proxy: options.proxy
        }).listen(options.port, '0.0.0.0');

        if (!options.dead) {
            require('livestyle/lib/installLiveCssFileWatcherInServer')(server, {
                debug: options.debug,
                root: options.root,
                mtime: false,
                watchfile: true,
                mappings: options.mappings,
                watchCssImages: options.cssImages
            }, require('socket.io'));
        }

        if (options.proxy) {
            grunt.log.writeln('Proxying to ' + options.proxy);
            if (options.root) {
                grunt.log.writeln('Serving static CSS files from ' + options.root);
            }
        } else if (options.root) {
            grunt.log.writeln('Serving static files from ' + options.root);
        }

        grunt.log.writeln('Listening to http://' + '0.0.0.0' + ':' + options.port + '/');
    });
};

@@ -1616,402 +1616,122 @@
 0.0'
-);%0A%0A        if (!options.dead) %7B%0A            require('livestyle/lib/installLiveCssFileWatcherInServer')(server, %7B%0A                debug: options.debug,%0A                root: options.root,%0A                mtime: false,%0A                watchfile: true,%0A                mappings: options.mappings,%0A                watchCssImages: options.cssImages%0A            %7D, require('socket.io'));%0A        %7D%0A%0A
+, function (error) %7B%0A            if (error) %7B%0A                return grunt.log.writeln(error);%0A            %7D%0A%0A    
     
@@ -1759,32 +1759,36 @@
 ) %7B%0A            
+  
+  
 grunt.log.writel
@@ -1826,32 +1826,36 @@
 y);%0A            
+    
 if (options.root
@@ -1866,32 +1866,36 @@
                 
+ 
+   
 grunt.log.writel
@@ -1958,18 +1958,26 @@
         
+   
+ 
 %7D%0A
+    
         
@@ -1995,32 +1995,36 @@
 options.root) %7B%0A
+    
             grun
@@ -2075,32 +2075,36 @@
  options.root);%0A
+    
         %7D%0A%0A     
@@ -2098,32 +2098,36 @@
      %7D%0A%0A        
+    
 grunt.log.writel
@@ -2192,16 +2192,482 @@
 + '/');%0A
+            grunt.event.emit('serverListening', options.port);%0A        %7D);%0A%0A        if (!options.dead) %7B%0A            require('livestyle/lib/installLiveCssFileWatcherInServer')(server, %7B%0A                debug: options.debug,%0A                root: options.root,%0A                mtime: false,%0A                watchfile: true,%0A                mappings: options.mappings,%0A                watchCssImages: options.cssImages%0A            %7D, require('socket.io'));%0A        %7D%0A%0A
     %7D);%0A

Move logging to express listen callback and emit a serverListening event when ready