add json format and refactor format module
bad call of packb
better high level API managing file handler and file path