Replaced puts call with a proper error message.