fixed file handling with admin rights