Made wrapper script handle concurrency correctly.