added timeout termination strategy

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
broken down a too long line in a main method

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>