Permission and error checks