use 'index' for filename if the path info is empty