Properly handle sample size parameter in GUI and file header