- changed readResource implementation to check for cancellation and return nulls in that case