Small bugfix on checkIfFileExists()