Fixed syntax error. Added extra logging.