using resource service with promise and saving to disk