Only way I can think of to lock down the file is encryption, however this leaves the problem that the 3rd party app wont understand the encrypted file. Its possible you can use dll injection to allow the 3rd party app to decrypt the file. I'm not sure if it will work as i haven't much experience of dll injection but it might be worth looking into.