Add ability to decode and encode same file multiple times