Check for expiration date when adding a profile

Fix issue #1