Check for valid file name