improved File handling of the SecurityManager