some file checks before calculations