Use q.catch and not q.fail to avoid deprecation warnings