Pattack File R/W and Modes

Signed-off-by: Pouyan Heyratpour <P.Heyratpour@Gmail.Com>