Added proper error messages to the manage function.