FileDb improvements

Fix:
 - improved encoding / decoding in FileDB