append with encoding
move script preparation code to Bootstrap