It would be good to return error from this function.