Check file exits; fix #1