Format path and write opts
Fix