Do file checking in the filesystem class instead