Update connection.rb

Update connection to log and verify data before writing to apple's push notification service (apns).