Catching OSError in case of os.stat failure.