Attach header at the end of a file

Hello gurus~

I had wanted to insert encryption header in front of a file.
But… I could not success in spite of hundreds of tries.

From other developer’s mention about header problem,
I decided to attach a header(tail?) at the end of a file.

My approach is that attaching a header at the timing of IRP_MJ_SET_INFORMATION’s Pre Callback with FltWriteFile() Function.

When following code through WinDbg, step from the FltWriteFile() Fuction is not moved to next line. And then I escaped from the kernel debugging mode automatically.

If an error message delivered to status, I could have handle it.
But I cannot know the reason at all.

Isn’t it illegal to use FltWriteFile() in SetInformation’s Pre Callback?
Or Any other way?