added --allow-empty option to not raise an error on a missing file