added gpu error handling in possible errors
hist pointer is not the culprit. have to check kernel