Added support for opening files as root