added a few safety checks and a progress message

Signed-off-by: Alexander Kucera <a.kucera@babylondreams.de>