initial path resolution and readFile implementation