abstract the write file path