Added the -d option to start in detached mode