fix bugs; support encrypt file