add init.sh for startup and redirect logs to files