remove try except in favor of if statment