But i can't edit it with an editor. When i just open and save it back, the file gets bigger and booting from sdcard doesnt work anymore.
It's a compiled binary file (albeit one with lots of readable strings inside) so when you 'edit' the file you break it, and because boot depends on this file, boot from SD is broken. Like all compiled code, the source file can be edited, then it needs to be recompiled when you create the image.