read task from ids file based on provided id. If not contained in ids file read file from provided directory