bug fix: do not wait for handle when there is no file in this layer