Add methods to check files and directories