add error handling for call to system_profiler