Add sudo write and cuh support