Added logic to deal with folders or file for results output