Finished(?) file protection. I think it works, but its not tested yet