Fixed scheduling bugs, added handling of encrypted file recovery