hack to work with file system and s3 both

@waqarshahid I am not sure, It's done long back. I prefer to close this PR and recheck this one.