rewrite file for themes