code for paired, single and check for read file existence