Added if-loop to catch re.search with no results
added a few echo statements
added more bug catchers