added retrieveFile option