check path is exists and stop when got IOError