Updated server code to use ErrorManager completely