set error if file empty