set file state as error