Since the sleep below is commented I guess this print_status isn't needed anymore, right?

On the other hand, sleep should be avoided since is known to cause issues with multi-threaded programs on various platforms, use "select(nil, nil, nil, <time>)" instead. It's explained on:

https://github.com/rapid7/metasploit-framework/blob/master/HACKING