Add check() method to file entity