Changed boolean type
Added errors due to lack of permission