updated init.d script to include logging