More robust start script for Linux/Mac