return if error occured