Added check for valid file