Fixing debian init script and small improvement to build script