Add fail_func parameter to wait_for()
Merge pull request #385 from jkrocil/wait_for_add_refresh_func

Add fail_func parameter to wait_for()