added some error handling for running on Linux or MacOS