Fix bug in replace module
Add secure_path