Adds startup and shutdown scripts to run directory

Fixed bugs