fixed filecheck, catches missing dirs with try/except