bug fix (use file data header for decrypter), refactoring