debug fixes and cleaning - file encryption