Fixed issue with anaconda, added error catching