Changed 'system' calls to 'exec' calls