Fixed errors for crashes.
Added more verbose error calls.