Added checkname function for filesystem