added logging
minor changes
added init script