Check bytes number on orginal media.pk2 file in the bottom right corned and remember it or write it down, and when ur done editing, check to make sure your byte number is the same as it was before if it's less then add null bytes (00 00) untill you have the exact number or simply look here
http://www.silkroadforums.com/viewtopic.php?t=30876