move head and tail to txt file to avoid red underlines