Bugfix when the temp file is not existing to get the correct return value