fix saving objects with relations to files and retry after sleep on rate limiting