Updated for file logging, keypress events

Added command line arguments for type of user event, logging to file
rather than db
Added logging type and keypress arguments