added support for encoding/decoding JS files