fixed issue with rewriting files
added path_publish and path_gen_preview methods