Fixed the compiler issues if permissions are correct. If not, displays an error properly.