guards against nonexisting files