Fix filename generation by header string