error trap for problems creating datacube