[Maurizio] waitFor: added callback in case of timeout