feature: add ResolveAndWrite function
example: decrease timeout, make Windows compatible, use ResolveAndWrite