Working version of callback module to log to database.