added dir check on /metrics