rewrite plugin. Make it simple. Use cwd