Working batch run for linux/os x