Now catching any error from rewriteConfig
Change throw error message