check length of filename when creating one