better error handling on restricted folders