Added error message for improper access