Add timeout after 1000 s to return results and exit app