initialise error variable