remove old file and add titles in heads