Error message on file opening error
Moved xoring buffer into standalone function
Moved filling UnpackData struct into seperate function