moved redis hostname to the parameter, fixed bug and created the createErrorImage