Added key logging