added code for file query