Added check for file