Hello Vks,
This error text "UNKNOWN ERROR" is very vague, so it is hard to tell without any more information.
It says its during the writing of the selafin header, so it means that Telemac tried to write to a file and failed. This could be a disk access problem, or could be related with disk access permissions. Do you have write permission on the directory you are running your simulation?
Also, you said you have done modifications in the code. Could you please attach the files necessary to reproduce this error?
Regards,
Phelype