choose better variable names
check the path permissions
move permission changes to install class