Logsearch: better argument parsing and error handling