Updated script to automatically run during startup.