check for file before attempting secret