added command-line options for debug and timeout