scripts and custom error message setting