Return the case id when adding a case

The print statements should be replaced with app.logger.error messages or removed completely