Fixed reading files with shell/non-shell