do not run makedumpfile when not necessary

Signed-off-by: Michal Toman <mtoman@redhat.com>